home *** CD-ROM | disk | FTP | other *** search
/ PC Media 8 / pc-media-windows-95.iso / shared.dir / 00382_DIALOG CALLING SCRIPTS.ls < prev    next >
Encoding:
Text File  |  1995-08-31  |  11.1 KB  |  376 lines

  1. on dialogOpen d
  2.   global gDialogWindow, gLastAudio
  3.   set gLastAudio to EMPTY
  4.   sound stop 1
  5.   if objectp(gDialogWindow) then
  6.     forget(gDialogWindow)
  7.   end if
  8.   set gDialogWindow to window "dw"
  9.   set the fileName of gDialogWindow to "Mdialogs.DIR"
  10.   set mywindowrect to rect(1, 1, 2, 2)
  11.   set the rect of gDialogWindow to mywindowrect
  12.   set the windowType of gDialogWindow to 2
  13.   set the modal of gDialogWindow to 1
  14.   set the titleVisible of gDialogWindow to 0
  15.   set the visible of gDialogWindow to 0
  16.   moveToBack(gDialogWindow)
  17.   open(gDialogWindow)
  18.   tell gDialogWindow
  19.     go(d)
  20.     set w to dialogwidth()
  21.     set ht to dialogHeight()
  22.   end tell
  23.   set h to the stageLeft + 320 - (w / 2)
  24.   set v to the stageTop + 240 - (ht / 2)
  25.   set mywindowrect to rect(h, v, h + w - 2, v + ht - 2)
  26.   set the rect of gDialogWindow to mywindowrect
  27.   set the visible of gDialogWindow to 1
  28.   moveToFront(gDialogWindow)
  29.   updateStage()
  30. end
  31.  
  32. on dialogClose
  33.   global gDialogWindow
  34.   if objectp(gDialogWindow) then
  35.     set the modal of gDialogWindow to 0
  36.     set the visible of gDialogWindow to 0
  37.     puppetSprite(48, 0)
  38.     forget(gDialogWindow)
  39.     updateStage()
  40.     if (the movie = "M08CHBKG.DIR") and (the frameLabel = "end") then
  41.       drawPaper()
  42.     end if
  43.   end if
  44. end
  45.  
  46. on timeOutResellerDialog
  47.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gAutoMode, gMainMovieName
  48.   if gDialogResult = EMPTY then
  49.     set gDialogCallback to "timeOutResellerDialog"
  50.     set gDialogResult to EMPTY
  51.     set gLastTimeoutScript to the timeoutScript
  52.     set gLastTimeoutLength to the timeoutLength
  53.     set the timeoutScript to EMPTY
  54.     set the timeoutLength to gDialogTimeout
  55.     set the timeoutScript to "goCloser"
  56.     if gAutoMode = 1 then
  57.       dialogOpen("d5")
  58.     else
  59.       dialogOpen("d5a")
  60.     end if
  61.   else
  62.     dialogClose()
  63.     set r to gDialogResult
  64.     set gDialogResult to EMPTY
  65.     set the timeoutScript to EMPTY
  66.     set the timeoutLength to 0
  67.     if r = "automatic" then
  68.       set gAutoMode to 1
  69.       set gTeaserMode to 0
  70.       clearTimeout()
  71.       if the movie = gMainMovieName then
  72.         clearMenuButtons()
  73.         selectSection("quick tour")
  74.       end if
  75.     else
  76.       if r = "interactive" then
  77.         set gAutoMode to 0
  78.         set gTeaserMode to 0
  79.         resetResellerTimeout()
  80.       else
  81.         if r = "restart" then
  82.           goCloser()
  83.           exit
  84.         end if
  85.       end if
  86.     end if
  87.   end if
  88. end
  89.  
  90. on exitDialog
  91.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gAutoMode, gResellerVersion, gLastScreen
  92.   if gDialogResult = EMPTY then
  93.     set gDialogCallback to "exitDialog"
  94.     set gDialogResult to EMPTY
  95.     set gLastTimeoutScript to the timeoutScript
  96.     set gLastTimeoutLength to the timeoutLength
  97.     set the timeoutScript to EMPTY
  98.     dialogOpen("d1")
  99.   else
  100.     dialogClose()
  101.     set r to gDialogResult
  102.     set gDialogResult to EMPTY
  103.     set the timeoutScript to EMPTY
  104.     set the timeoutLength to 0
  105.     if r = "exit" then
  106.       if gResellerVersion = 0 then
  107.         scanDialog()
  108.       else
  109.         goCloser()
  110.       end if
  111.     end if
  112.     set the timeoutScript to gLastTimeoutScript
  113.     set the timeoutLength to gLastTimeoutLength
  114.   end if
  115. end
  116.  
  117. on scanDialog
  118.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gScanExitFlag, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  119.   if gDialogResult = EMPTY then
  120.     set gDialogCallback to "scanDialog"
  121.     set gDialogResult to EMPTY
  122.     set gLastTimeoutScript to the timeoutScript
  123.     set gLastTimeoutLength to the timeoutLength
  124.     set the timeoutScript to EMPTY
  125.     dialogOpen("d6")
  126.   else
  127.     dialogClose()
  128.     set r to gDialogResult
  129.     set gDialogResult to EMPTY
  130.     set the timeoutScript to EMPTY
  131.     set the timeoutLength to 0
  132.     if r = "exit" then
  133.       goCloser()
  134.       exit
  135.     else
  136.       if r = "scan" then
  137.         set gScanExitFlag to 3
  138.         goScan()
  139.         exit
  140.       end if
  141.     end if
  142.     set the timeoutScript to gLastTimeoutScript
  143.     set the timeoutLength to gLastTimeoutLength
  144.   end if
  145. end
  146.  
  147. on deleteFilesDialog
  148.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  149.   if gDialogResult = EMPTY then
  150.     set gDialogCallback to "deleteFilesDialog"
  151.     set gDialogResult to EMPTY
  152.     set gLastTimeoutScript to the timeoutScript
  153.     set gLastTimeoutLength to the timeoutLength
  154.     set the timeoutScript to EMPTY
  155.     dialogOpen("d2")
  156.   else
  157.     dialogClose()
  158.     set r to gDialogResult
  159.     set gDialogResult to EMPTY
  160.     set the timeoutScript to EMPTY
  161.     set the timeoutLength to 0
  162.     if r = "exit" then
  163.       doQuit()
  164.       exit
  165.     else
  166.       if r = "delete" then
  167.         deleteFilesDialog2()
  168.         exit
  169.       end if
  170.     end if
  171.     set the timeoutScript to gLastTimeoutScript
  172.     set the timeoutLength to gLastTimeoutLength
  173.   end if
  174. end
  175.  
  176. on deleteFilesDialog2
  177.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  178.   if gDialogResult = EMPTY then
  179.     set gDialogCallback to "deleteFilesDialog2"
  180.     set gDialogResult to EMPTY
  181.     set gLastTimeoutScript to the timeoutScript
  182.     set gLastTimeoutLength to the timeoutLength
  183.     set the timeoutScript to EMPTY
  184.     dialogOpen("d7")
  185.   else
  186.     dialogClose()
  187.     set r to gDialogResult
  188.     set gDialogResult to EMPTY
  189.     set the timeoutScript to EMPTY
  190.     set the timeoutLength to 5
  191.     if r = "exit" then
  192.       doQuit()
  193.       exit
  194.     end if
  195.     set the timeoutScript to gLastTimeoutScript
  196.     set the timeoutLength to gLastTimeoutLength
  197.     deleteFilesDialog()
  198.   end if
  199. end
  200.  
  201. on restartDialog
  202.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion
  203.   timeOutResellerDialog()
  204.   exit
  205.   if gDialogResult = EMPTY then
  206.     if gResellerVersion = 1 then
  207.       timeOutResellerDialog()
  208.       exit
  209.     end if
  210.     set gDialogCallback to "restartDialog"
  211.     set gDialogResult to EMPTY
  212.     set gLastTimeoutScript to the timeoutScript
  213.     set gLastTimeoutLength to the timeoutLength
  214.     set the timeoutScript to EMPTY
  215.     set the timeoutLength to gDialogTimeout
  216.     set the timeoutScript to "goCloser"
  217.     dialogOpen("d4")
  218.   else
  219.     dialogClose()
  220.     set r to gDialogResult
  221.     set gDialogResult to EMPTY
  222.     set the timeoutScript to EMPTY
  223.     set the timeoutLength to 0
  224.     if r = "exit" then
  225.       goCloser()
  226.       exit
  227.     else
  228.       if r = "restart" then
  229.         goRestart()
  230.         exit
  231.       end if
  232.     end if
  233.     set the timeoutScript to gLastTimeoutScript
  234.     set the timeoutLength to gLastTimeoutLength
  235.   end if
  236. end
  237.  
  238. on AutoDecisionDialog
  239.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion, gMainMovieName, gAutoMode, gTeaserMode
  240.   if gDialogResult = EMPTY then
  241.     set gDialogCallback to "AutoDecisionDialog"
  242.     set gDialogResult to EMPTY
  243.     set gLastTimeoutScript to the timeoutScript
  244.     set gLastTimeoutLength to the timeoutLength
  245.     set the timeoutScript to EMPTY
  246.     if gResellerVersion = 1 then
  247.       set the timeoutLength to gDialogTimeout
  248.       set the timeoutScript to "chooseTeaserDemo"
  249.     end if
  250.     dialogOpen("d5")
  251.   else
  252.     dialogClose()
  253.     set r to gDialogResult
  254.     set gDialogResult to EMPTY
  255.     if r = "interactive" then
  256.       set gAutoMode to 0
  257.       set gTeaserMode to 0
  258.       if gResellerVersion = 1 then
  259.         resetResellerTimeout()
  260.       else
  261.         set the timeoutScript to gLastTimeoutScript
  262.         set the timeoutLength to gLastTimeoutLength
  263.       end if
  264.       exit
  265.     else
  266.       if r = "restart" then
  267.         goRestart()
  268.         exit
  269.       else
  270.         set the timeoutScript to gLastTimeoutScript
  271.         set the timeoutLength to gLastTimeoutLength
  272.       end if
  273.     end if
  274.   end if
  275. end
  276.  
  277. on timeOutDialog
  278.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength
  279.   if gDialogResult = EMPTY then
  280.     set gDialogCallback to "timeOutDialog"
  281.     set gDialogResult to EMPTY
  282.     set gLastTimeoutScript to the timeoutScript
  283.     set gLastTimeoutLength to the timeoutLength
  284.     set the timeoutScript to EMPTY
  285.     set the timeoutLength to gDialogTimeout
  286.     set the timeoutScript to "goCloser"
  287.     dialogOpen("d5")
  288.   else
  289.     dialogClose()
  290.     set r to gDialogResult
  291.     set gDialogResult to EMPTY
  292.     set the timeoutScript to EMPTY
  293.     set the timeoutLength to 0
  294.     if r = "exit" then
  295.       goCloser()
  296.       exit
  297.     else
  298.       if r = "restart" then
  299.         goRestart()
  300.         exit
  301.       end if
  302.     end if
  303.     set the timeoutScript to gLastTimeoutScript
  304.     set the timeoutLength to gLastTimeoutLength
  305.   end if
  306. end
  307.  
  308. on endAutoDemoDialog
  309.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion
  310.   if gDialogResult = EMPTY then
  311.     set gDialogCallback to "endAutoDemoDialog"
  312.     set gDialogResult to EMPTY
  313.     set gLastTimeoutScript to the timeoutScript
  314.     set gLastTimeoutLength to the timeoutLength
  315.     set the timeoutScript to EMPTY
  316.     if gResellerVersion = 1 then
  317.       set the timeoutLength to gDialogTimeout
  318.       set the timeoutScript to "goCloser"
  319.     end if
  320.     dialogOpen("d3")
  321.   else
  322.     dialogClose()
  323.     set r to gDialogResult
  324.     set gDialogResult to EMPTY
  325.     set the timeoutScript to EMPTY
  326.     set the timeoutLength to 0
  327.     if r = "exit" then
  328.       exitDialog()
  329.       exit
  330.     else
  331.       if r = "restart" then
  332.         goRestart()
  333.         exit
  334.       end if
  335.     end if
  336.     set the timeoutScript to gLastTimeoutScript
  337.     set the timeoutLength to gLastTimeoutLength
  338.   end if
  339. end
  340.  
  341. on endAutoDemoDialogReseller
  342.   global gIntroTimeOut, gInteractiveTimeout, gOEMTimeout, gResellerTimeout, gDialogTimeout, gDialogWindow, gDialogResult, gDialogCallback, gLastTimeoutScript, gLastTimeoutLength, gResellerVersion
  343.   if gDialogResult = EMPTY then
  344.     set gDialogCallback to "endAutoDemoDialogReseller"
  345.     set gDialogResult to EMPTY
  346.     set gLastTimeoutScript to the timeoutScript
  347.     set gLastTimeoutLength to the timeoutLength
  348.     set the timeoutScript to EMPTY
  349.     if gResellerVersion = 1 then
  350.       set the timeoutLength to gDialogTimeout
  351.       set the timeoutScript to "goCloser"
  352.     end if
  353.     dialogOpen("d9")
  354.   else
  355.     dialogClose()
  356.     set r to gDialogResult
  357.     set gDialogResult to EMPTY
  358.     set the timeoutScript to EMPTY
  359.     set the timeoutLength to 0
  360.     if r = "menu" then
  361.       set gAutoMode to 0
  362.       set gTeaserMode to 0
  363.       resetResellerTimeout()
  364.       goMenu()
  365.       exit
  366.     else
  367.       if r = "restart" then
  368.         goRestart()
  369.         exit
  370.       end if
  371.     end if
  372.     set the timeoutScript to gLastTimeoutScript
  373.     set the timeoutLength to gLastTimeoutLength
  374.   end if
  375. end
  376.